package com.huizu.goods.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.huizu.goods.mapper.ShopRotationMapper;
import com.huizu.goods.domain.ShopRotation;
import com.huizu.goods.service.IShopRotationService;
import com.huizu.common.core.text.Convert;

/**
 * 轮播图Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-02-07
 */
@Service
public class ShopRotationServiceImpl implements IShopRotationService 
{
    @Autowired
    private ShopRotationMapper shopRotationMapper;

    /**
     * 查询轮播图
     * 
     * @param id 轮播图主键
     * @return 轮播图
     */
    @Override
    public ShopRotation selectShopRotationById(Long id)
    {
        return shopRotationMapper.selectShopRotationById(id);
    }

    /**
     * 查询轮播图列表
     * 
     * @param shopRotation 轮播图
     * @return 轮播图
     */
    @Override
    public List<ShopRotation> selectShopRotationList(ShopRotation shopRotation)
    {
        return shopRotationMapper.selectShopRotationList(shopRotation);
    }

    /**
     * 新增轮播图
     * 
     * @param shopRotation 轮播图
     * @return 结果
     */
    @Override
    public int insertShopRotation(ShopRotation shopRotation)
    {
        return shopRotationMapper.insertShopRotation(shopRotation);
    }

    /**
     * 修改轮播图
     * 
     * @param shopRotation 轮播图
     * @return 结果
     */
    @Override
    public int updateShopRotation(ShopRotation shopRotation)
    {
        return shopRotationMapper.updateShopRotation(shopRotation);
    }

    /**
     * 批量删除轮播图
     * 
     * @param ids 需要删除的轮播图主键
     * @return 结果
     */
    @Override
    public int deleteShopRotationByIds(String ids)
    {
        return shopRotationMapper.deleteShopRotationByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除轮播图信息
     * 
     * @param id 轮播图主键
     * @return 结果
     */
    @Override
    public int deleteShopRotationById(Long id)
    {
        return shopRotationMapper.deleteShopRotationById(id);
    }
}
